'use strict';
const Controller = require('egg').Controller;
class HomeController extends Controller {
    //验证码
    async coder() {
        const { ctx } = this;
        let captcha = await this.service.user.captcha(); // Service里面的方法
        ctx.body = captcha.data; // 返回一张svg图片
    }
}
module.exports = HomeController;